package builder;

import modelos.ModeloDB;

public class ModeloDirector {
	
	private ModeloBuilder modeloBuilder;
	 
    public void setModeloBuilder(ModeloBuilder mb) { 
    	modeloBuilder = mb; 
    }
    
    public ModeloDB getModelo() { 
    	return modeloBuilder.getModelo(); 
    }
 
    public void construirModelo() {
       modeloBuilder.crearModelo();
       modeloBuilder.buildCodigo();
       modeloBuilder.buildDescripcion();
       modeloBuilder.buildEstatus();
       if (modeloBuilder instanceof IngredienteModeloBuilder)
    	   ((IngredienteModeloBuilder)modeloBuilder).buildStock();
    }


}
